//约瑟夫环
int main()
{
    LinkQueue q;
    for(int i=0;i<=13;i++)
    {
        q.push((void*)i);
    }
    int count=0;
    while(q.size()>1)
    {
        long num=(long)*q.getfront();
        q.pop();
        count++;
        if(count==3)
        {
            std::cout<<num<<"被杀死"<<std::endl;
            count=0;
        }
        else
            q.push((void*)num);
    }
    std::cout<<(long)*q.getFront()<<"活了下来！"<<std::endl;
    return 0;

}